package exercises;

/**
 * Created by lauraionescu on 10/04/2014.
 */
public class TriangleExercises {

    public static void main(String[] args) {
        easiestExercise();
        System.out.println();
        horizontalLine(8);
        System.out.println();
        verticalLine(8);
        System.out.println();
        rightTriangle(3);
    }

    public static void easiestExercise() {
        System.out.println("*");
    }

    public static void horizontalLine(int n){

        for (int i = 0; i<n;i++)
            System.out.print("*");
    }

    public static void verticalLine(int n){
        for (int i = 0; i < n; i++)
            System.out.println("*");
    }

    public static void rightTriangle(int n){
        for (int i = 0; i < n; i++){
            for (int j = 0; j < i+1; j++){
                System.out.print("*");
            }
            System.out.println();
        }
    }


}
